package com.info.zhiduoduo.repository.mapper.maker;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.info.zhiduoduo.repository.entity.maker.Tag;
import com.info.zhiduoduo.repository.entity.maker.MakerTag;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 创客标签 Mapper 接口
 * </p>
 *
 * @author bob
 * @since 2018-12-30
 */
public interface MakerTagMapper extends BaseMapper<MakerTag> {

	@Select("select t.tagid,t.tagname,t.sort from zdd_maker_tag ut " +
			"join zdd_tag t on t.tagid = ut.tagid " +
			"where userid = #{userid} " +
			"order by t.sort desc ")
	List<Tag> getUserTagList(@Param("userid") int userid);
}
